import ComposeProvider from '@/providers';
import '@/styles/tailwindcss.css';
import '@/lib/env';
import { Toaster } from '@/components/ui/toaster';
import type { Metadata } from 'next';

export const metadata: Metadata = {
  description: 'Rin 外卖',
  title: {
    template: '%s · Rin 外卖',
    default: 'Rin 外卖',
  },
};

export default async function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html
      lang="zh"
      className={
        'scroll-smooth scrollbar-thin font-sans antialiased w-screen overflow-x-clip'
      }
    >
      <body className="bg-background text-foreground transition-colors w-screen overflow-x-clip">
        <ComposeProvider>
          <Toaster />
          {children}
        </ComposeProvider>
      </body>
    </html>
  );
}
